﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="eContactUs.aspx.cs" Inherits="TheheVn.eContactUs" %>
<%@ Register TagPrefix="uc1" TagName="UcCustomHtml" Src="~/UcCustomHtml.ascx" %>
<%@ Register assembly="DevExpress.Web.v14.1, Version=14.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script>
        window.onload = init;
        var vertx1 = [357, 430, 383, 314];
        var verty1 = [423, 446, 506, 486];

        var vertx2 = [304, 233, 233, 304];
        var verty2 = [480, 460, 387, 409];

        var vertx3 = [233, 304, 303, 230];
        var verty3 = [374, 351, 274, 297];

        var vertx4 = [358, 313, 308, 429];
        var verty4 = [333, 276, 248, 309];
        
        var vertx5 = [435, 483, 437, 393];
        var verty5 = [315, 379, 437, 380];
        function init() {
            if (window.Event) {
                document.captureEvents(Event.MOUSEMOVE);
            }
            document.onmousemove = getCursorXY;
            document.onmousedown = mouse_click;
        }

        function mouse_click(e) {
            var x = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft);
            var y = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);
    
            if (pnpoly(4, vertx1, verty1, x, y)) {
                window.location.assign("eWhoAreOurPartner.aspx");
            }
            else if (pnpoly(4, vertx2, verty2, x, y)) {
                window.location.assign("eWhatWeHave.aspx");
            }
            else if (pnpoly(4, vertx3, verty3, x, y)) {
                window.location.assign("eWhatDoWeDo.aspx");
            }
            else if (pnpoly(4, vertx4, verty4, x, y)) {
                    
                window.location.assign("eWhoWeAre.aspx");
            }
            else if (pnpoly(4, vertx5, verty5, x, y)) {
                window.location.assign("eContactUs.aspx");
            }
        }

        function getCursorXY(e) {
            var x = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft);
            var y = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);

           //alert(x +" | "+y);
            if (pnpoly(4, vertx1, verty1, x, y)) {
                var d1 = document.getElementById('i1').style;
                d1.fontsize = "150%";
                d1.color = "black";
                document.getElementById('back_ground_uc').style.backgroundImage = "url('images/back_ground_uc_1.png')";
            }
            else if (pnpoly(4, vertx2, verty2, x, y)) {
                var d2 = document.getElementById('i2').style;
                d2.fontsize = "18px";
                d2.color = "black";
                document.getElementById('back_ground_uc').style.backgroundImage = "url('images/back_ground_uc_2.png')";
            }
            else if (pnpoly(4, vertx3, verty3, x, y)) {
                var d3 = document.getElementById('i3').style;
                d3.fontsize = "18px";
                d3.color = "black";
                document.getElementById('back_ground_uc').style.backgroundImage = "url('images/back_ground_uc_3.png')";
            }
            else if (pnpoly(4, vertx4, verty4, x, y)) {
                var d4 = document.getElementById('i4').style;
                d4.fontsize = "18px";
                d4.color = "black";
                document.getElementById('back_ground_uc').style.backgroundImage = "url('images/back_ground_uc_4.png')";
            }
            else {
                d1 = document.getElementById('i1').style;
                d1.fontsize = "11px";
                d1.color = "#999999";
                d2 = document.getElementById('i2').style;
                d2.fontsize = "11px";
                d2.color = "#999999";
                d3 = document.getElementById('i3').style;
                d3.fontsize = "11px";
                d3.color = "#999999";
                d4 = document.getElementById('i4').style;
                d4.fontsize = "11px";
                d4.color = "#999999";
                
                document.getElementById('back_ground_uc').style.backgroundImage = "url('images/back_ground_uc.png')";
            }
        }

        function pnpoly(nvert, vertx, verty, testx, testy) {
            var i, j, c = false;
            for (i = 0, j = nvert - 1; i < nvert; j = i++) {
                if (((verty[i] > testy) != (verty[j] > testy)) &&
                    (testx < (vertx[j] - vertx[i]) * (testy - verty[i]) / (verty[j] - verty[i]) + vertx[i])) {
                    c = !c;
                }
            }
            return c;
        }

    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <div id="back_ground_uc" style="cursor:pointer; background-image: url('images/back_ground_uc.png');margin-left: 87px;width: 1139px; height: 643px; ">
         <div id="logoText" class="logo_text" runat="server"></div>
        <div  id= "i1" class="logo_text_inactive_1" >
            WHO ARE OUR PARTNER?
        </div>
        <div  id= "i2" class="logo_text_inactive_2" >
            WHAT WE HAVE?
        </div>
        <div  id= "i3" class="logo_text_inactive_3" >
            WHAT DO WE DO?
        </div>
        <div  id= "i4" class="logo_text_inactive_4" >
            WHO ARE WE? 
        </div>
        <div class="htlm_editor">
            <uc1:UcCustomHtml ID="UcCustomHtml1" runat="server" />
        </div>
    </div>
</asp:Content>
